package com.chb.catRecommend;

import java.util.HashMap;
import java.util.Map;

import org.apache.hadoop.conf.Configuration;

public class RunJob {
	public static void main(String[] args) throws Exception {
		System.setProperty("HADOOP_USER_NAME", "chb");
		Configuration conf = new Configuration();
		Map<String, String> paths = new HashMap<String, String>();
		paths.put("step1Input", "/user/chb/input/sam_tianchi_2014002_rec_tmall_log.csv");
		paths.put("step1Output", "/user/chb/output/step1Out");
		
		paths.put("step2Input", "/user/chb/output/step1Out");
		paths.put("step2Output", "/user/chb/output/step2Out");
		
		paths.put("step3Input", "/user/chb/output/step2Out");
		paths.put("step3Output", "/user/chb/output/step3Out");
		
		paths.put("step4InputSmall", "/user/chb/output/step2Out/part-r-00000");//喜爱得分
		paths.put("step4InputBig", "/user/chb/output/step3Out");  //同现矩阵
		paths.put("step4Output", "/user/chb/output/step4Out");
		
		paths.put("step5Input", "/user/chb/output/step4Out");
		paths.put("step5Output", "/user/chb/output/step5Out");
		
		
		//Step1.run(conf, paths);
		//Step2.run(conf, paths);
		Step5.run(conf, paths);
		
	 
	}

	/**
	 * 根据用户对商品的操作， 
	 * 设置对商品的喜爱度。
	 */
	public static Map<String, Integer> R = new HashMap<String, Integer>();
	static {
		R.put("click", 1);   //点击
		R.put("collect", 2); //收藏
		R.put("cart", 3);	 //加入购物篮
		R.put("alipay", 4);  //付款
	}
}
